<?php
/**
 * Created by PhpStorm.
 * User: Castle
 * Date: 2016/4/11
 * Time: 22:52
 */
return [
    'SWOOLE'=>[
        'AUTO_RELOAD'=>function(){return false;},
        //监听配置
        'LISTEN'=>[
            [
                'HOST'=>'0.0.0.0',
                'PORT'=>'8250',
                'TYPE'=>'Socket',
                'DISPATCH'=>function($data){
                    broadcast(8252,$data);
                },
                'OUT'=>function($d){
                    return $d;
                }
            ],
            [
                'HOST'=>'0.0.0.0',
                'PORT'=>'8251',
                'TYPE'=>'WebSocket',
                'DISPATCH'=>function($data){
                    broadcast(8252,$data);
                },
                'OUT'=>function($d){
                    return $d;
                }
            ],
            [
                'HOST'=>'0.0.0.0',
                'PORT'=>'8252',
                'TYPE'=>'WebSocket',
                'DISPATCH'=>function($data){
                },
                'OUT'=>function($d){
                    return $d;
                }
            ],
        ],
        'PROCESS'=>[
        ],
        'CALLBACK'=>[
//            'PIPE_MESSAGE'=>function(\swoole_server $server,$from_worker_id,$data){
//                $Process = static_keep('Client');
//            }
        ],
        //SWOOLE 配置
        'CONF'=>[
            'daemonize' => 0, //自动进入守护进程
            'task_worker_num' => 0,//开启task功能，
            'dispatch_mode '=>3,//轮询模式
            'worker_num'=>1,
        ],
        //定时器配置
        'TIMER'=>[

        ],

    ]
];